package te2;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.commons.lang3.time.FastDateFormat;

import com.sun.org.apache.bcel.internal.generic.NEW;

/**
*@author created by zhanxianbo
*@date 2017年7月13日--上午10:29:54
*/
public class test9 {

	
	public static void main(String[] args) {
		/*String date = getShortDateString(new Date());
		Date date1 = new Date();
		System.out.println(date1.getTime());*/
		SimpleDateFormat sFormat = new  SimpleDateFormat("yyyy年MM月dd日");
		System.out.println(sFormat.format(new Date()));
		
		
		
	}
	
	public static String getShortDateString(java.util.Date date) {
		if (date == null) {
			return "";
		}
		FastDateFormat dfmt = FastDateFormat.getInstance("yyyy-MM-dd");
		return dfmt.format(date);
	}
	
	public static Integer  timeDifference(Date currDate,Date oldDate){
		Long curr =  currDate.getTime();
		Long old = oldDate.getTime();
		Long tmp = (curr-old)/86400000;
		return Math.abs(tmp.intValue());
	}
	
}


